package com.tencent.wxcloudrun.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tencent.wxcloudrun.model.MyRemind;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MyRemindMapper extends BaseMapper<MyRemind> {
    int deleteByPrimaryKey(Integer id);

    int insert(MyRemind record);

    int insertSelective(MyRemind record);

    MyRemind selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MyRemind record);

    int updateByPrimaryKey(MyRemind record);

    List<MyRemind> findByUserId(String userId);

    @Select("select * from my_remind where now()<busi_time and DATE_ADD(NOW(), INTERVAL 15 MINUTE)>=busi_time and enabled=1")
    List<MyRemind> findRemindPushMsg();

}